package com.jingxuan.util;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

/**
 * SearchKeywordProcessor 调试测试类
 */
public class DebugSearchKeywordProcessorTest {

    @Test
    public void testDebug() {
        // 测试基本关键词处理
        SearchKeywordProcessor.KeywordInfo info = SearchKeywordProcessor.processKeyword("苹果手机");
        
        System.out.println("Original: " + info.getOriginalKeyword());
        System.out.println("Exact: " + info.getExactKeyword());
        System.out.println("Prefix: " + info.getPrefixKeyword());
        System.out.println("Fuzzy: " + info.getFuzzyKeyword());
        
        // 先检查实际值
        assertNotNull(info.getOriginalKeyword());
        assertNotNull(info.getExactKeyword());
        assertNotNull(info.getPrefixKeyword());
        assertNotNull(info.getFuzzyKeyword());
    }

    @Test
    public void testDebugPrefix() {
        // 测试前缀处理
        SearchKeywordProcessor.KeywordInfo info = SearchKeywordProcessor.processKeyword("官方苹果");
        
        System.out.println("Original: " + info.getOriginalKeyword());
        System.out.println("Exact: " + info.getExactKeyword());
        System.out.println("Prefix: " + info.getPrefixKeyword());
        System.out.println("Fuzzy: " + info.getFuzzyKeyword());
        
        // 先检查实际值
        assertNotNull(info.getOriginalKeyword());
        assertNotNull(info.getExactKeyword());
        assertNotNull(info.getPrefixKeyword());
        assertNotNull(info.getFuzzyKeyword());
    }
}